package com.yuanxiao.impl;

import com.yuanxiao.api.Service.IpService;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.RpcContext;
import org.springframework.stereotype.Component;

@Service
@Component
public class IpServiceimpl implements IpService {
    @Override
    public String service(String name) {

        System.out.println("C端被调用成功,浏览器的ip地址是:"+ RpcContext.getContext().getAttachment("clientIp"));

        return "C端调用成功,传入参数为:"+name;
    }
}
